package com.banmao.mall.controller.client;

import com.banmao.mall.model.bo.client.brand.BrandListBO;
import com.banmao.mall.model.vo.BaseRespVO;
import com.banmao.mall.model.vo.client.brand.BrandDetailVO;
import com.banmao.mall.model.vo.client.brand.BrandListVO;
import com.banmao.mall.service.client.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController("cBrandController")
@RequestMapping("/wx")
public class BrandController {

    @Autowired
    BrandService brandService;

    // 获取品牌商详细信息
    @RequestMapping("/brand/detail")
    public BaseRespVO brandDetail(@RequestParam("id") Integer brandId) {

        BrandDetailVO brandDetailVO = brandService.brandDetail(brandId);

        return BaseRespVO.ok(brandDetailVO);
    }


    // 获取品牌商列表
    @RequestMapping("/brand/list")
    public BaseRespVO brandList(BrandListBO brandListBO) {

        BrandListVO brandListVO = brandService.brandList(brandListBO);

        return BaseRespVO.ok(brandListVO);
    }

}
